home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / t_os / shell / igo / gosource / mdhandy.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-16  |  3.0 KB  |  114 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <winb.h>
  5. #include <te.h>
  6. #include <fntb.h>
  7. #include <gui.h>
  8. #include "banx.h"
  9. #include "kifuctrl.h"
  10.  
  11. int    dialogId_handy = -1 ;
  12. int    dialogMessageId_handy = -1 ;
  13. int    radioId[9] = -1 ;
  14. int    radioMessageId[9] = -1 ;
  15. int    igo_handysetId[2] = -1 ;
  16. int    btnMessageId[2] = -1 ;
  17.  
  18. /*    選択されているラジオボタンの ID を格納する変数        */
  19.  
  20. int        radioAlterFlag = 0 ;
  21.  
  22. /*    initDataMIHANDY:radioId[0]:MJ_TICONL40の呼び出し関数    */
  23. /*    initDataMIHANDY:radioId[1]:MJ_TICONL40の呼び出し関数    */
  24. /*    initDataMIHANDY:radioId[2]:MJ_TICONL40の呼び出し関数    */
  25. /*    initDataMIHANDY:radioId[3]:MJ_TICONL40の呼び出し関数    */
  26. /*    initDataMIHANDY:radioId[4]:MJ_TICONL40の呼び出し関数    */
  27. /*    initDataMIHANDY:radioId[5]:MJ_TICONL40の呼び出し関数    */
  28. /*    initDataMIHANDY:radioId[6]:MJ_TICONL40の呼び出し関数    */
  29. /*    initDataMIHANDY:radioId[7]:MJ_TICONL40の呼び出し関数    */
  30. /*    initDataMIHANDY:radioId[8]:MJ_TICONL40の呼び出し関数    */
  31. int    radioFunc(kobj, messId, argc, pev, trigger)
  32. int        kobj ;
  33. int        messId ;
  34. int        argc ;
  35. EVENT    *pev ;
  36. int        trigger ;
  37. {
  38.     /*    現在選択状態にあるボタンを非選択状態にし、選択可にします    */
  39.     MTL_resetFlagObj(radioAlterFlag,~(MS_UNSELECT | MS_TOGGLE)) ;
  40.     MMI_SendMessage(radioAlterFlag, MM_SHOW, 0) ;
  41.  
  42.     /*    置き石選択フラグを更新します    */
  43.     radioAlterFlag = kobj ;
  44.  
  45.     /*    呼び出し元トグルボタンを選択状態にし、選択不可にします    */
  46.     MTL_setFlagObj(kobj, MS_UNSELECT | MS_TOGGLE) ;
  47.     MMI_SendMessage(kobj, MM_SHOW, 0) ;
  48.  
  49.     return NOERR ;
  50. }
  51.  
  52. /*    initDataMIHANDY:igo_handysetId[0]:MJ_DBUTTONL40の呼び出し関数    */
  53. int    igo_handyset(kobj, messId, argc, pev, trigger)
  54. int        kobj ;
  55. int        messId ;
  56. int        argc ;
  57. EVENT    *pev ;
  58. int        trigger ;
  59. {
  60. int        handy;
  61.  
  62.     /*    各設定値の読み取り    */
  63.     for (handy = 0 ; handy < 9 ; handy++)
  64.     {
  65.         if (radioId[handy] == radioAlterFlag)
  66.             break ;
  67.     }
  68.  
  69.     /*    現在選択状態にあるボタンを非選択状態にし、選択可にします    */
  70.     MTL_resetFlagObj(radioAlterFlag,~(MS_UNSELECT | MS_TOGGLE)) ;
  71.     MMI_SendMessage(radioAlterFlag, MM_SHOW, 0) ;
  72.  
  73.     /*    dialogId_handyで示されるオブジェクトを消す        */
  74.     MMI_SendMessage( dialogId_handy , MM_ERASE , 0 ) ;
  75.  
  76.     /*    オブジェクトをダイアログから取り外す    */
  77.     MMI_SendMessage( dialogId_handy , MM_DETACH , 0 ) ;
  78.  
  79.     handy += '2' ;
  80.     if(kifu_handy(handy)== 0){
  81.         comment_dispFunc();
  82.         title_fname_clear();
  83.         title_dispFunc();
  84.     }
  85.     retunrInitMenuFunc();
  86.     
  87.     return NOERR ;
  88. }
  89.  
  90. /*    initDataMIHANDY:igo_handysetId[1]:MJ_DBUTTONL40の呼び出し関数    */
  91. int    cancelFunc(kobj, messId, argc, pev, trigger)
  92. int        kobj ;
  93. int        messId ;
  94. int        argc ;
  95. EVENT    *pev ;
  96. int        trigger ;
  97. {
  98.  
  99.     /*    現在選択状態にあるボタンを非選択状態にし、選択可にします    */
  100.     MTL_resetFlagObj(radioAlterFlag,~(MS_UNSELECT | MS_TOGGLE)) ;
  101.     MMI_SendMessage(radioAlterFlag, MM_SHOW, 0) ;
  102.  
  103.     /*    dialogId_handyで示されるオブジェクトを消す        */
  104.     MMI_SendMessage( dialogId_handy , MM_ERASE , 0 ) ;
  105.  
  106.     /*    オブジェクトをダイアログから取り外す    */
  107.     MMI_SendMessage( dialogId_handy , MM_DETACH , 0 ) ;
  108.  
  109.     retunrInitMenuFunc();
  110.  
  111.     return NOERR ;
  112. }
  113.  
  114.